]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Accept scrolls / swipes either way
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 15 Aug 2014 16:43:22 +0000 (12:43 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 1 Sep 2014 20:15:49 +0000 (13:15 -0700)
If you turn on natural scrolling, instead of swiping up, you need to
swipe down, which is bizarre. Just accept any type of scroll and have
them contribute to the delta.

https://bugzilla.gnome.org/show_bug.cgi?id=734874

js/ui/screenShield.js

index 0f5d140146f05b8184e4b145c21e7f3c3776bf61..6c1bc5e7aeed200e5dfa3cdd8c43d842c974f4e5 100644 (file)
@@ -687,10 +687,10 @@ const ScreenShield = new Lang.Class({
             return Clutter.EVENT_PROPAGATE;
 
         let delta = 0;
-        if (event.get_scroll_direction() == Clutter.ScrollDirection.UP)
+        if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH)
+            delta = Math.abs(event.get_scroll_delta()[0]);
+        else
             delta = 5;
-        else if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH)
-            delta = Math.max(0, event.get_scroll_delta()[0]);
 
         this._lockScreenScrollCounter += delta;